﻿@model YQBlog.Models.UserProfileModel
@using res = Resource.Views.Shared.Shared;
@{
    string weblang = Resource.Models.Web.Web.Lang != "" ? Resource.Models.Web.Web.Lang : "zh-cn";
    YQBlog.General.GeneralConfigInfo ci = ViewBag.CI as YQBlog.General.GeneralConfigInfo;
  } 
<div class="uitem">@(res.UserProfile)</div>
<script src="@Url.Content("~/Scripts/jquery.unobtrusive-ajax.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
<div id="Loading">@Resource.Views.Home.Home.Ajax_Wait</div>
<div id="AjaxResult"></div>
@using (Ajax.BeginForm("AjaxUserProfile", new AjaxOptions { LoadingElementId = "profileloading", InsertionMode = InsertionMode.InsertBefore, OnSuccess = "UserProfileSubmitSuccess" }))
{
    <div id="commentform">
            @Html.HiddenFor(m => m.Medals)
           <div class="editor-label">
                @Html.LabelFor(m => m.NickName)
            </div>
            <div class="editor-field">
                @Html.TextBoxFor(m => m.NickName)
                @Html.ValidationMessageFor(m => m.NickName)
            </div>
            <div class="label">
                <div class="editor-label">
                    @Html.LabelFor(m => m.Gender)
                </div>
                <div class="editor-field">
                    @Html.DropDownList("Gender")
                </div>
            </div>
            <div class="editor-label">
                @Html.LabelFor(m => m.Birth)
            </div>
            <div class="editor-field">
                @Html.TextBoxFor(m => m.Birth)
                @Html.ValidationMessageFor(m => m.Birth)
            </div>
            <div class="editor-label">
                @Html.LabelFor(m => m.Location)
            </div>
            <div class="editor-field">
                @Html.TextBoxFor(m => m.Location)
                @Html.ValidationMessageFor(m => m.Location)
            </div>
            <div class="editor-label">
                @Html.LabelFor(m => m.QQ)
            </div>
            <div class="editor-field">
                @Html.TextBoxFor(m => m.QQ)
                @Html.ValidationMessageFor(m => m.QQ)
            </div>
            <div class="editor-label">
                @Html.LabelFor(m => m.Sina)
            </div>
            <div class="editor-field">
                @Html.TextBoxFor(m => m.Sina)
                @Html.ValidationMessageFor(m => m.Sina)
            </div>
            <div class="editor-label">
                @Html.LabelFor(m => m.Facebook)
            </div>
            <div class="editor-field">
                @Html.TextBoxFor(m => m.Facebook)
                @Html.ValidationMessageFor(m => m.Facebook)
            </div>
            <div class="editor-label">
                @Html.LabelFor(m => m.Twitter)
            </div>
            <div class="editor-field">
                @Html.TextBoxFor(m => m.Twitter)
                @Html.ValidationMessageFor(m => m.Twitter)
            </div>
            <div class="editor-label">
                @Html.LabelFor(m => m.Website)
            </div>
            <div class="editor-field">
                @Html.TextBoxFor(m => m.Website)
                @Html.ValidationMessageFor(m => m.Website)
            </div>
            <div class="editor-label">
                @Html.LabelFor(m => m.Phone)
            </div>
            <div class="editor-field">
                @Html.TextBoxFor(m => m.Phone)
                @Html.ValidationMessageFor(m => m.Phone)
            </div>
            <div @if (ci.IfSendReplyEmail==2){@Html.Raw("style=\"display:none;\"")}>
                <div class="editor-label">
                    @Html.LabelFor(m => m.Email)
                </div>
                <div class="editor-field">
                    @Html.TextBoxFor(m => m.Email)
                    @Html.ValidationMessageFor(m => m.Email)
                </div>
            </div>
            <div class="label" @if (ci.IfSendReplyEmail==2)
                               {@Html.Raw("style=\"display:none;\"")}>
                <div class="editor-label">
                    @Html.LabelFor(m => m.IsSendEmail)
                </div>
                <div class="editor-field radios">
                    <input type="radio" value="1" name="IsSendEmail" id="IsSendEmail_y"  @if (Model.IsSendEmail == "1")
                                                                                    {@Html.Raw("checked=\"checked\"")}/>
                    <label for="IsSendEmail_y">
                        @res.Send</label>
                    <input type="radio" value="2" name="IsSendEmail" id="IsSendEmail_n" @if (Model.IsSendEmail == "2")
                                                                                {@Html.Raw("checked=\"checked\"")}/>
                    <label for="IsSendEmail_n">
                        @res.Donotsend</label>
                </div>
            </div>
            <div class="editor-label">
                @Html.LabelFor(m => m.Intro)
            </div>
            <div style="width: 500px" class="editor_ubb">
              <div> 
              <a onclick="seditor_insertunit('Intro', '[url=###]', '[/url]')" class="tb_link" href="javascript:;">Link</a>
              <a onclick="seditor_insertunit('Intro', '[img]', '[/img]')" class="tb_img" href="javascript:;">Image</a>
              <a onclick="seditor_insertunit('Intro', '[b]', '[/b]')" class="tb_bold" href="javascript:;">B</a>
              </div>
            </div>
            <div class="editor-field clstxtarea">
                @Html.TextAreaFor(model => model.Intro, new { style = "width: 500px; height: 100px" })
                @Html.ValidationMessageFor(m => m.Intro)
            </div>
            <div class="editor-label">
                @Html.LabelFor(m => m.Signature)
            </div>
            <div style="width: 500px" class="editor_ubb">
              <div> 
              <a onclick="seditor_insertunit('Signature', '[url=###]', '[/url]')" class="tb_link" href="javascript:;">Link</a>
              <a onclick="seditor_insertunit('Signature', '[img]', '[/img]')" class="tb_img" href="javascript:;">Image</a>
              <a onclick="seditor_insertunit('Signature', '[b]', '[/b]')" class="tb_bold" href="javascript:;">B</a>
              </div>
            </div>
            <div class="editor-field clstxtarea">
                @Html.TextAreaFor(model => model.Signature, new { style = "width: 500px; height: 100px" })
                @Html.ValidationMessageFor(m => m.Signature)
            </div>
            <p>
                <input type="submit" value="@Resource.Views.Home.Home.Submit" id="BtnSubmit"/> 
                <span id="profileloading" style="display:none;"><img src="/Content/image/loading/loader.gif" /></span>
            </p>
    </div>
}
<script src="@Url.Content("~/Scripts/jquery-ui-1.8.11.min.js")" type="text/javascript"></script>
@if (Resource.Models.Web.Web.Lang == "" || Resource.Models.Web.Web.Lang == "zh-tw")
{ 
    <script src="@Url.Content("~/Scripts/jquery.ui.datepicker-zh-CN.js")" type="text/javascript"></script>
}
<script type="text/javascript">
    $(function () {
        $("#Birth").datepicker(
        {
        changeMonth:true,
        changeYear:true
        });
    });
</script>
